import request from '@/utils/request';
import store from '@/store'

// 列表删除接口
export function deletePageList(data) {
    return request({
        url: `/maintain/maintain/componentMg/deleteComponent/${data}`,
        method: 'delete'
    })
}

// 新增页面管理
export function addPageManage(data) {
    const params = {
        ...data,
        createUserId: store.getters.userId,
        updateUserId: store.getters.userId
    }
    return request({
        url: '/maintain/maintain/componentMg/addComponent',
        method: 'post',
        data: params
    })
}

// 表格列表修改
export function editListColumn(data) {
    const params = {
        ...data,
        updateUserId: store.getters.userId
    }
    return request({
        url: '/maintain/maintain/componentMg/editComponent',
        method: 'post',
        data: params
    })
}